From 5ed8cf50b8a319275b7b4b6093f0010820fa22d1 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sun, 20 Sep 2009 22:39:13 -0400 Subject: [PATCH] Don't dereference a NULL error This was pointed out in bug 595790. --- gtk/gtkiconfactory.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gtk/gtkiconfactory.c b/gtk/gtkiconfactory.c index cced1108e5..6578da8615 100644 --- a/gtk/gtkiconfactory.c +++ b/gtk/gtkiconfactory.c @@ -1500,9 +1500,10 @@ render_icon_name_pixbuf (GtkIconSource *icon_source, if (!tmp_pixbuf) { - g_warning ("Error loading theme icon '%s' for stock: %s", - icon_source->source.icon_name, error->message); - g_error_free (error); + g_warning ("Error loading theme icon '%s' for stock: %s", + icon_source->source.icon_name, error ? error->message : ""); + if (error) + g_error_free (error); return NULL; } -- 2.30.2